|
Command: |
Translate a block of data from encryption under one key, to encryption under another key. |
|
Notes: |
Use of this command requires the optional Message Encryption licence. Error code 67 will be returned if a command is not licenced. The data to be translated by this command may be presented to the HSM in different formats, as indicated by the Input Format Flag field. The translated data block may be returned to the host in different formats, as indicated by the Output Format Flag field. |
|
Field |
Length & Type |
Details |
|
COMMAND MESSAGE |
||
|
Message Header |
m A |
Will be returned to the Host unchanged. |
|
Command Code |
2 A |
Value “M4”. |
|
Source Mode Flag |
2 N |
00 : ECB |
|
Destination Mode Flag |
2 N |
00 : ECB |
|
Input Format Flag |
1 N |
0 : Binary |
|
Output Format Flag |
1 N |
0 : Binary |
|
Source Key Type |
3 H |
Type of Source (Decryption) Key. The following Key Types are permitted: 00A : ZEK |
|
Source Key |
16H |
Source (Decryption) Key. |
|
Destination Key Type |
3 H |
Type of Destination (Encryption) Key. The following Key Types are permitted: 00A : ZEK |
|
Destination Key |
16H |
Destination (Encryption) Key. |
|
Source IV |
16 H |
The source IV, to be used in conjunction
with Source Key. |
|
Destination IV |
16 H |
The input IV, to be used in conjunction with Destination Key. When translating the first of a series
of blocks, the initial Destination IV should be set by the caller – a
typical value is {00
00 00 00 00 00 00 00}. |
|
Message Length |
4 H |
The length of the following field, in bytes. This must be a multiple of 8 for binary formatted messages, or a multiple of 16 for hex-encoded binary messages. |
|
Encrypted Message |
|
The message to be translated. The length & type of the field will depend on the value of the Input Format Flag: |
|
n B |
Input Format Flag = 0 (Binary); | |
|
n H |
Input Format Flag = 1 (Hex-Encoded
Binary); | |
|
End Message Delimiter |
1 C |
Optional. Must be present if a message
trailer is present. Value X'19. |
|
Message Trailer |
n A |
Optional. Maximum length 32 characters. |
|
Field |
Length & Type |
Details |
|
RESPONSE MESSAGE |
||
|
Message Header |
m A |
Will be returned to the Host unchanged. |
|
Response Code |
2 A |
Value “M5”. |
|
Error Code |
2 N |
00 : No error Any standard error code. |
|
Source IV |
16 H |
The output IV, calculated using the
Source Key. |
|
End Message Delimiter |
1 C |
Will only be present if present in the command message. Value X'19 |
|
Message Trailer |
n A |
Will only be present if present in the command message. Maximum length 32 characters |
|
Message Header |
m A |
Will be returned to the Host unchanged |